angular.module('noteApp',[])
  .controller('MyCtr',['$scope',function ($scope) {
    $scope.getCount = function () {
      return 100 - $scope.message.length
    }

    $scope.save = function () {
      localStorage.setItem('node_key',JSON.stringify($scope.message))
    }

    $scope.read = function () {
      $scope.message = JSON.parse(localStorage.getItem('node_key') || JSON.stringify('') )
    }

    $scope.dele = function () {
      localStorage.removeItem('node_key')
      $scope.message = ''
    }
  }])